package org.fage.semples.model;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "exam_user_role")
public class ExamUserRole implements Serializable {

	private static final long serialVersionUID = -6109328207632018590L;

	@Id
	@ManyToOne(cascade = {CascadeType.DETACH, CascadeType.PERSIST, CascadeType.MERGE})
	@JoinColumn(name = "user_id")
	private ExamUser examUser;
	
	@Id
	@ManyToOne(cascade = {CascadeType.DETACH, CascadeType.PERSIST, CascadeType.MERGE})
	@JoinColumn(name = "role_id")
	private ExamRole examRole;

	public ExamUserRole() {
		super();
	}

	public ExamUserRole(ExamUser examUser, ExamRole examRole) {
		super();
		this.examUser = examUser;
		this.examRole = examRole;
	}

	public ExamUser getExamUser() {
		return examUser;
	}

	public void setExamUser(ExamUser examUser) {
		this.examUser = examUser;
	}

	public ExamRole getExamRole() {
		return examRole;
	}

	public void setExamRole(ExamRole examRole) {
		this.examRole = examRole;
	}

	
	
	
}
